home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
misc
/
amised
/
scripts
/
agindexcreator.rexx
next >
Wrap
OS/2 REXX Batch file
|
1999-04-19
|
1KB
|
57 lines
/* AmigaGuide Index creator for AMIS */
OPTIONS RESULTS
SIGNAL ON SYNTAX
SIGNAL ON BREAK_C
'Query NAME'
name=result
'Query POS'
pos=result
'File NAME="'||name||'.index" NEW'
'AutoIndent OFF'
'Viewer NAME="AmigaGuide"'
'Insert TEXT="¶@node INDEX¶¶¶@endnode¶"'
'CursUp 2'
'SelectWindow NAME="'||name||'"'
'Query LINES'
lines=result
'Cursup TOP'
'Graphics OFF'
line=1
'GetLine'
text=result
do while line<=lines
if upper(left(text,5))="@NODE" then
do
'SelectWindow NAME="'||name||'.index"'
parse var text '@node' test1 test2
if test2="" then
do
test2=test1
test1=left(test1,length(test1)-1)
end
test1=strip(strip(test1),,'"')
test2=strip(strip(left(test2,length(test2)-1)),,'"')
'Insert TEXT=" @{*"'||test2||'*" link *"'||test1||'*"}¶"'
'SelectWindow NAME="'||name||'"'
end
line=line+1
'Goto LINE='||line
'GetLine'
text=result
end
'Goto POS='||pos
'Graphics ON'
'SelectWindow NAME="'||name||'.index"'
'CursUp TOP'
exit
SYNTAX:
say "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
exit
BREAK_C:
say "*** Break"
exit